package cn.com.controler.ShowComment;

import cn.com.entity.ShowComment;

import java.util.List;

public class ShowCommentDAO {

    //查询所有
    public List<ShowComment> getallcomm(int id){
        String str = "select e.CommentId,user.Username,e.CommentContent,e.CommentTime from user,(select CommentId,CommentUserId,CommentContent,CommentTime from article,comment where article.ArticleId = comment.CommentArtId and article.ArticleId = ?) e where user.UserId = e.CommentUserId";
        Object [] arr = new Object[]{id};
        return ShowCommentDAOTemplete.selectdata(str,arr);
    }
}
